package com.countryfinancial.android.property;


import com.countryfinancial.android.R;

import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class PropertyHomePageActivity extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_property_home_page);
        //Setting up tabs
        //Initializing Tabs
        TabHost th = (TabHost)findViewById(android.R.id.tabhost);
        TabSpec ts1 = th.newTabSpec("policy_information");
        TabSpec ts2 = th.newTabSpec("coverages");
        TabSpec ts3 = th.newTabSpec("billing");
        TabSpec ts4 = th.newTabSpec("claims");
        ts1.setIndicator("Policy info").setContent(new Intent(this,PropertyPolicyInformationActivity.class));
        ts2.setIndicator("Coverages").setContent(new Intent(this,PropertyCoveragesActivity.class));
        ts3.setIndicator("Billing").setContent(new Intent(this,PropertyBillingActivity.class));
        ts4.setIndicator("Claims").setContent(new Intent(this,PropertyClaimsActivity.class));
        
        th.addTab(ts1);
        th.addTab(ts2);     
        th.addTab(ts3);     
        th.addTab(ts4);      
        th.setCurrentTab(0);        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_property_home_page, menu);
        return true;
    }
}
